const UserService = require('../service/UserService.js')
const userController = {
  register: async(req,res)=>{
    let { phone, code } = req.body
    let handleRes = await UserService.register(phone,code)
    res.send(handleRes)
  },
  login: async(req,res)=>{
    let handleRes = await UserService.login(req)
    res.send(handleRes)
  },
  forget: async(req,res)=>{
    let { phone, code } = req.body
    let handleRes = await UserService.forget(req)
    res.send(handleRes)
  },
}

module.exports = userController